Pod::Spec.new do |s|
  s.name             = 'flutter_plugin_sdk_storekit'
  s.version          = '1.1.2' # 版本号修改
  s.summary          = 'Flutter Plugin for StoreKit SDK'
  s.description      = <<-DESC
A Flutter plugin that integrates StoreKit SDK for in-app subscriptions.
                       DESC
  s.homepage         = 'http://example.com'
  s.license          = { :file => '../LICENSE' }
  s.author           = { 'Your Company' => 'email@example.com' }
  s.source           = { :path => '.' }
  s.source_files = 'Classes/**/*'
  s.public_header_files = 'Classes/**/*.h'
  s.dependency 'Flutter' #依赖库
  s.platform = :ios, '13.0'  # 根据StoreKitSDK的要求调整最低版本

  # 添加XCFramework依赖
  s.preserve_paths = 'Frameworks/StoreKitSDK.xcframework' 
  s.xcconfig = {
    'OTHER_LDFLAGS' => '-framework StoreKitSDK',
    'FRAMEWORK_SEARCH_PATHS' => '$(PODS_ROOT)/../../flutter_plugin_sdk_storekit/ios/Frameworks'
  }
  s.vendored_frameworks = 'Frameworks/StoreKitSDK.xcframework'

  # Flutter.framework does not contain a i386 slice.
  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
  s.swift_version = '5.0'
end
